//
//  PosterCollectionViewCell.m
//  HWmovie
//
//  Created by Mac on 15/7/24.
//  Copyright (c) 2015年 杨梦佳. All rights reserved.
//

#import "PosterCollectionViewCell.h"
#import "UIImageView+WebCache.h"
#import "UIViewExt.h"
#import "common.h"
@implementation PosterCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    
    
    self=[super initWithFrame:frame ];
    
    if (self) {
  //   NSLog(@"%@",frame);
   
        
        
        _imageView=[[UIImageView alloc]initWithFrame:CGRectMake(self.width*0.05, 0, self.width*0.9, self.height*0.9)];
        [self.contentView addSubview:_imageView];
        
        
        
    }
    return self;
    
}




-(void)setUrlImage:(NSString *)urlImage
{
    
    _urlImage=urlImage;
    
    
    [self setNeedsLayout];
    
    
    
    
}

-(void)layoutSubviews
{

    [_imageView   sd_setImageWithURL:[NSURL URLWithString:_urlImage]];
    
}

@end
